package com.jilefojing.service;

import java.util.List;

import com.jilefojing.beans.enums.ItemTypeEnumForSource;
import com.jilefojing.beans.exception.UserContextException;
import com.jilefojing.beans.pojos.RTagSource;
import com.jilefojing.beans.pojos.enhanced.EnhancedRTagSource;
import com.jilefojing.beans.query.RTagSourceQuery;
import com.jilefojing.beans.vo.Pagination;
import com.jilefojing.context.beans.vo.UserContext;
import com.jilefojing.service.base.IBaseService;

/**
 * 
 * @author 作者 jgshun
 * @date 创建时间 2016年07月25日 22时06分59秒
 */
public interface IRTagSourceService extends IBaseService<RTagSource> {
	Pagination<EnhancedRTagSource> getPagination(RTagSourceQuery rTagSourceQuery, Pagination<EnhancedRTagSource> pagination, UserContext userContext);

	List<EnhancedRTagSource> conventRTagSources2EnhancedRTagSources(List<RTagSource> rTagSources);

	List<EnhancedRTagSource> getEnhancedRTagSourcesByItem(ItemTypeEnumForSource itemType, long itemId, UserContext userContext);

	List<EnhancedRTagSource> getEnhancedRTagSourcesByItems(ItemTypeEnumForSource itemType, List<Long> itemIds, UserContext userContext);

	List<EnhancedRTagSource> appendEnhancedItem2EnhancedRTagSources(List<EnhancedRTagSource> enhancedRTagSources, UserContext userContext);

	List<EnhancedRTagSource> appendEnhancedTags2EnhancedRTagSources(List<EnhancedRTagSource> enhancedRTagSources, UserContext userContext);

	List<EnhancedRTagSource> appendEnhancedUsers2EnhancedRTagSources(List<EnhancedRTagSource> enhancedRTagSources, UserContext userContext);

	/**
	 * 只更新排序，状态
	 * 
	 * @param rTagSource
	 * @param userContext
	 * @throws UserContextException
	 */
	void update(RTagSource rTagSource, UserContext userContext) throws UserContextException;

}
